<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
session_start();
class Accueil extends CI_Controller {
	function __construct()
	    {
		parent::__construct();
                $this->load->helper(array('url','form'));
                $this->load->library('form_validation');
                $this->load->library('session');
                $this->load->library('lang');
                $this->load->library('user_agent');
                $this->load->library('input');
            }
            function index(){
                if(isset($_SESSION['lg'])) { 
                    $this->load->view('routeur/rt');
                } else {
                if($this->agent->accept_lang('fr')){
                        $_SESSION['lg']='fr';
                        $this->load->view('routeur/rt');
                }elseif ($this->agent->accept_lang('de')) {
                        $_SESSION['lg']='de';
                        $this->load->view('routeur/rt');
                    } else {
                        $_SESSION['lg']='en';
                        $this->load->view('routeur/rt');
                    }
                
                }
            }
}